<%@ page language="java" isELIgnored="false" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html>
<head>
<title>代理监控</title>
<%@ include file="/common/liger_ui.jsp" %>

<script type="text/javascript">
var m;
function doNew() {
	/* var argv = new Object();
	argv.action = "I";
	showDialog("./show.html", argv, 400, 600); */
	$.ligerui.remove(m);
	 m=$.ligerDialog.open({id:'proxyDialog',isResize:true,isHidden:false,title:'导入代理IP',id: 'proxyDialog',width: 450, url: '<%=request.getContextPath() %>/proxyAction!toUpload.action'});
}
function showMessage(_id) {
	$.ligerui.remove(m);
	 m=$.ligerDialog.open({title:'代理使用记录',id: 'proxyRecoder'+_id,width: 870,height:450,isDrag:false, url: '<%=request.getContextPath() %>/proxyAction!toDialogRecoder.action?ipId='+_id,isResize:true,isHidden:false});
}
$(function (){ 
	var griddata=${data};
var grid = $("#maingrid").ligerGrid({
			rownumbers :true,
	            columns: [
	              { name: 'id', display: 'id', align:'left' , hide:true},
	              { name: 'ip', display: 'IP', align:'left' ,width: 180 },
	              { name: 'addTime', display: '创建时间', width: 180,align:'left',type: 'date',format: 'yyyy-MM-dd hh:mm'  ,render: function (row){
	               	 
	               	 return new Date(parseInt(row.addTime)).toLocaleString().replace(/年|月/g, "–").replace(/日/g, " "); 
	                 }},
                 { name: 'work', display: '状态', width: 80,align:'left',isSort :true,type :'int',render: function (row){
               	  var html=null;
               	 if(row.work=="1"){
               		 html="<font color='red'>使用中..</font>";
               	 }else{
               		 html="等待..";
               	 }
               	 return html;
                }},
                { name: 'lastUserTime', display: '使用时间', width: 180,align:'left',type: 'date',format: 'yyyy-MM-dd hh:mm',render: function (row){
	               		if(row.lastUserTime==null||row.lastUserTime==""){
	               			return null;
	               		}
                	return new Date(parseInt(row.lastUserTime)).toLocaleString().replace(/年|月/g, "–").replace(/日/g, " "); 
	                 }},
                <!-- { name: 'ipNum', display: '使用次数', width: 120,align:'left',isSort :true,type:'int' },-->
                 { name: 'longTime', display: '耗时(s)', width: 100,align:'left'},
              { name: 'current', display: '并发数', width: 100,align:'left',isSort :true,type:'int', render: function (row){
            	  var html=row.current;
             	 if(row.work=="0"||row.current<=0){
             		 html="0";
             	 }
             	 return html;
              } },
                ///{ name: 'lastUserId', display: '渠道', width: 80,align:'left'  },
                 //{ name: 'fromURL', display: '来源', width: 100,align:'left',render: function (row){
                //	  var html=null;
                //	 if(row.fromURL==""){
                //		 html="手动导入";
                //	 }
               // 	 return html;
              //   } },
                 { name: '', display: '详情', align:'left' ,width: 100,render: function (row){
                	 ///var html = '<input type="checkbox" rowid="' + row.id + '" value="dddd">';
                	 var html="<a href='#'  onClick=\"showMessage('"+row.id+"')\">详情</a>";
                	 return html;
                 } }
             ],width:'98%',pageSize: 15,
             data: { Rows: griddata }
         }); 
		});
</script>
<style type="text/css">
<!--
.STYLE1 {
	color: #990000;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<TABLE cellSpacing=1 cellPadding=3 width="100%" border=0 >
  <TBODY>
  <TR class="tr1">
    <TD colspan="2">目前代理IP情况 </TD>
    </TR>
 
  <TR class="tab">
    <TD height="26" align=left width="90%" >
    <table border="1" bordercolor="#cccccc" width="100%">
    <tr height="10px;">
     <td>代理池中的IP数为： ${pm.poolsNum }&nbsp;&nbsp;</td>
     <td>空闲的IP数为：${pm.poolsWaiting }&nbsp;&nbsp;</td>
   <td>  数据库可用的IP数为： ${pm.waitNum }
      &nbsp;&nbsp;</td>
  <td>     预备池中的IP数为： ${pm.readyNum }&nbsp;&nbsp;</td>
 <td>  废弃在IP数为：${pm.lostNum }  
   </td>
   </tr>
   </table>  
    </TD>
    <td width="10%"><input type="button" id="addBtn" value="导入代理IP" onclick="doNew()" id="Submit2" size =13 style="width:80px;">
  </td>
  </TR>
  <tr>
  
  <TD align="left"  colspan="2">
    <div id="maingrid"></div>
    </TD>
  </tr>
</TBODY>

</TABLE>
<!-- 
</TABLE>

<p></p>
<table width="100%" border="0" cellpadding="3" CELLSPACING="1" class="tabg">
  <TR class="tr1">
    <TD colspan="6">查询结果 </TD>
    </TR>
  <tr class="tr2">
    <td class="title">ID</td>
    <td class="title">角色名称</td>
    <td class="title">角色描述</td>
    <td class="title">操作人</td>
	<td class="title">操作时间</td>
	<td class="title">操作</td>
  </tr>
  
  
  
  <tr class="tr2" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>1</td>
    <td>超级管理员</td>
    <td>超级管理员</td>
    <td>开发小组</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr3" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>2</td>
    <td>测试用户</td>
    <td>查询</td>
    <td>张三</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr2" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>1</td>
    <td>超级管理员</td>
    <td>超级管理员</td>
    <td>开发小组</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr3" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>2</td>
    <td>测试用户</td>
    <td>查询</td>
    <td>张三</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr2" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>1</td>
    <td>超级管理员</td>
    <td>超级管理员</td>
    <td>开发小组</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr3" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td>2</td>
    <td>测试用户</td>
    <td>查询</td>
    <td>张三</td>
    <td>2012-12-31</td>
    <td>
	    <a href="#">修改</a>
	    &nbsp;&nbsp;
			<a href="#">删除</a>
    </td>
  </tr>
  <tr class="tr2" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
    <td colspan="6" align="right">共100条记录   每页显示<select><option>10</option></select>&nbsp;&nbsp;跳转到第<select><option>10</option></select>页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  </tr>
</table>

 -->
</body>
</html>

